package com.atguigu.test.interview;

/**
 * @author xr-8
 * @date 2024-03-27
 * @time 18:42
 */
public class ttt {
static String ss;
    public static void main(String[] args) {
        jiajia();
        ex();
        doubleNum(1000);
    }

    private static void jiajia() {
        System.out.println(ss);
        int i=3;
        System.out.println(i+=i-=i*=i);

        int x = 2;
        int y = 1;
        System.out.println((x>0 || x<10 && y<0));
        System.out.println(((x>0 || x<10) && y<0));
        String s = "hello";
        System.out.println(s.concat("world"));
        System.out.println(s);

        String a = "hello";
        String b = "he" + "llo";
        System.out.println(a==b);
    }

    public static void ex() {
        int i =0;
        try {
            System.out.println(1);
        } catch (Exception e){
            System.out.println(2);
        } finally {
            System.out.println(3);
        }
        System.out.println(4);
    }

    public static void doubleNum(int n)
    {
        System.out.println(n);
        if(n<=5000)
            doubleNum(n*2);
        System.out.println(n);
    }
}
